﻿@model RiverCruise.Models.Account.User

@{
    ViewBag.Title = "Login";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="container-fluid">
    <div class="row">
        <div class="col-md-6 col-md-offset-3" id="loginBox">
        @using (Html.BeginForm("Login", "Account", FormMethod.Post, new { ReturnUrl = ViewBag.ReturnUrl }))
        {
            @Html.AntiForgeryToken()
            @Html.HiddenFor(x => x.ReturnUrl)
            <fieldset>
                <legend>Enter user credentials:</legend>
                @if (!ViewData.ModelState.IsValid)
                {
                    <div class="bs-callout bs-callout-danger text-danger">
                        @Html.ValidationSummary()
                    </div>
                }

                <div class="form-group">
                    @Html.LabelFor(model => model.UserName)
                    @Html.TextBoxFor(model => model.UserName, new { @class = "form-control", placeholder = "Username" })
                    <span class="text-danger">@Html.ValidationMessageFor(model => model.UserName)</span>
                    <br />
                </div>
                <div class="form-group">
                    @Html.LabelFor(model => model.Password)
                    @Html.PasswordFor(model => model.Password, new { @class = "form-control", placeholder = "Password" })
                    <span class="text-danger">@Html.ValidationMessageFor(model => model.Password)</span>
                <br />
                </div>

                <div class="form-group text-center">
                    <input type="submit" value="Log in" class="btn btn-default btn-block" />
                </div>
            </fieldset>

        }
        </div>
    </div>
</div>